package org.goochasca

sealed abstract case class Position(axis: Char, private val legend: String) {
  final def asLegend(o: Orientation): String = legend concat o.legendSuffix
}
object TOP extends Position('t', "t")
object BOTTOM extends Position('x', "b")
object LEFT extends Position('y', "l")
object RIGHT extends Position('r', "r")

sealed abstract case class Orientation(legendSuffix: String)
object HORIZONTAL extends Orientation("")
object VERTICAL extends Orientation("v")